<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Title</title>
    
    <style>
      .card {
        border: 1px gray solid;
        border-radius: 10px;
        padding: 15px;
      }
      
      .card-title {
        font-size: 15px;
        font-weight: bold;
        margin: 10px;
      }
      
      .card-body > div {
        color: darkgray;
        background: pink;
        margin: 10px;
        width: 100px;
        height: 100px;
      }
    </style>
  </head>
  <body>
    <!--flex-direction属性设置主轴方向，其属性值可为水平主轴row、反向水平主轴row-reverse、垂直主轴column或反向垂直主轴column-reverse-->
    <div class="card">
      <div class="card-title">水平主轴[flex-direction: row]</div>
      <div class="card-body" style="display: flex;flex-direction: row">
        <div>1</div>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">反向水平主轴[flex-direction: row-reverse]</div>
      <div class="card-body" style="display: flex;flex-direction: row-reverse">
        <div>1</div>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">垂直主轴[flex-direction: column]</div>
      <div class="card-body" style="display: flex;flex-direction: column">
        <div>1</div>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">反向垂直主轴[flex-direction: column-reverse]</div>
      <div class="card-body" style="display: flex;flex-direction: column-reverse">
        <div>1</div>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
  </body>
</html>